// src/App.js
import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import Layout from './components/Layout';
import FileList from './components/FileList';
import DataViewer from './components/DataViewer';
import VersionCompare from './components/VersionCompare';
import './App.css';

function App() {
  return (
    <ConfigProvider locale={zhCN}>
      <Router>
        <Layout>
          <Routes>
            <Route path="/" element={<FileList />} />
            <Route path="/view/:versionId" element={<DataViewer />} />
            <Route path="/compare" element={<VersionCompare />} />
          </Routes>
        </Layout>
      </Router>
    </ConfigProvider>
  );
}

export default App;